home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 138
/
Volume 138 Aug 19 2011 - Damaged.iso
/
Games
/
tobby_on_ice.swf
/
scripts
/
frame_22
/
DoAction.as
Wrap
Text File
|
2011-08-19
|
2KB
|
106 lines
function dispGetScore(nScore, nx, ny)
{
var _loc1_ = _root;
var _loc2_ = "gs" + String(_loc1_.depthGetScore);
_loc1_.attachMovie("getScore",_loc2_,_loc1_.depthGetScore);
_loc1_[_loc2_]._x = nx;
_loc1_[_loc2_]._y = ny;
_loc1_[_loc2_].getScore = nScore;
_loc1_.depthGetScore = _loc1_.depthGetScore + 1;
}
function clearAllMC()
{
var _loc1_ = this;
i = 0;
while(i < _loc1_.iceMCList.length)
{
if(i != 0 && i != 8)
{
j = 0;
while(j < _loc1_.iceMCList[i].length)
{
_loc1_.iceMCList[i][j].removeMovieClip();
j++;
}
}
i++;
}
_loc1_.tobbyMC.removeMovieClip();
_loc1_.tobbyShadowMC.removeMovieClip();
_loc1_.bullMC.removeMovieClip();
_loc1_.waterEffectMC.removeMovieClip();
i = 0;
while(i < _loc1_.itemMCList.length)
{
_loc1_.itemMCList[i].removeMovieClip();
i++;
}
_loc1_.bgMC.removeMovieClip();
_loc1_.scoreMC.removeMovieClip();
_loc1_.lastPlayerMC.removeMovieClip();
_loc1_.myItemMC.removeMovieClip();
if(_loc1_.stageNum == 3)
{
_loc1_.LastSecMC.removeMovieClip();
}
}
function initMovie()
{
var _loc1_ = this;
_loc1_.stageNum = 1;
_loc1_.playerNum = 3;
_loc1_.score = 0;
_loc1_.pauseFlg = false;
_loc1_.instWindowFlg = false;
_loc1_.returnWindowFlg = false;
}
function initGame()
{
this.clearAllMC();
this.setDepths();
}
function initContinue()
{
var _loc1_ = this;
_loc1_.clearAllMC();
_loc1_.setDepths();
_loc1_.playerNum = 2;
_loc1_.score = 0;
}
function setDepths()
{
var _loc1_ = this;
_loc1_.depthBG = 9000;
_loc1_.depthIce = 10000;
_loc1_.depthCharShadow = 40000;
_loc1_.depthItem = 42000;
_loc1_.depthChar = 50000;
_loc1_.depthWaterEffect = 95000;
_loc1_.depthGetScore = 100000;
_loc1_.depthIF = 110000;
_loc1_.depthWindow = 200000;
}
function pauseOn()
{
this.pauseFlg = true;
_root.LastSecMC.pauseOn();
}
function pauseOff()
{
this.pauseFlg = false;
_root.LastSecMC.pauseOFF();
}
function randomInt(maxNum)
{
var _loc1_ = Math.random() * maxNum;
if(_loc1_ == 0)
{
_loc1_ = 1;
}
else
{
_loc1_ = Math.ceil(_loc1_);
}
return _loc1_;
}